#include <iostream>

#include "lib.h"

using namespace std;

int main()
{
  cout << "########################################" << endl
       << "Teste la librairie lib.h" << endl
       << "########################################" << endl << endl;

  int x( 5 );
  unsigned n( 6 );

  cout << "Utilisation de puissance( int, unsigned )" << endl;

  cout << "5^6 = " << puissance( x, n ) << endl;

  x = 3;
  n = 5;

  cout << "3^5 = " << puissance( x, n ) << endl;

  x = -2;
  n = 11;

  cout << "(-2)^11 = " << puissance( x, n ) << endl;

  cout << endl << "Utilisation de digit( int, int )" << endl;

  int y( 3 );
  x = 65437;

  cout << y << "-ième digit de " << x << " : " << digit( x, y ) << endl;

  return 0;
}
